package design.pattern.Iterator;


public class MainTest {
    public static void main(String[] args) {
//        List<String> l = new ArrayList<>();
//        Iterator<String> iterator = l.iterator();
//        while (iterator.hasNext()){
//            String next = iterator.next();
//            System.out.println(l);
//        }


        List list = new ListImpl(100);

        for (int i = 0;i<100;i++){
            list.add(i);
        }

        Iterator iterator = list.iterator();
        while (iterator.hasNext()){
            Object next = iterator.next();
            System.out.println(next);
        }
    }
}
